package com.kakaxi.mybilibili.module.home.category.model;

import com.alibaba.fastjson.JSONObject;
import com.kakaxi.mybilibili.common.WebUrlConst;
import com.kakaxi.mybilibili.net.FastJsonCacheRequest;
import com.kakaxi.mybilibili.net.Netroid;
import com.vincestyling.netroid.Listener;

/**
 * 分类分区首个碎片数据层实现类
 * Created by kakaxi on 16/11/28.
 */

public class CategoryAreaFirstModel implements ICategoryAreaFirstModel {
    @Override
    public void getCategoryAreaFirstData(String tid, Listener<JSONObject> listener) {
        String url = WebUrlConst.CATEGORY_HOME_AREA_FIRST_URL + tid;
        Netroid.addRequest(new FastJsonCacheRequest(url, null, listener, null), true);
    }

    @Override
    public void getCategoryAreaFirstAllData(String tid, Listener<JSONObject> listener) {
        String url = WebUrlConst.CATEGORY_HOME_AREA_FIRST_ALL_FRONT_URL + tid + WebUrlConst
                .CATEGORY_HOME_AREA_FIRST_ALL_BEHIND_URL;
        Netroid.addRequest(new FastJsonCacheRequest(url, null, listener, null), true);
    }


}
